//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatMiniappVersion, WechatMiniappVersionResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatMiniappVersionList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatMiniappVersionResponse>(`/uctoo/wechat_miniapp_version/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatMiniappVersion = async (id: string) => {
  return requestClient.get<WechatMiniappVersion>(`/uctoo/wechat_miniapp_version/${id}`);
};

export const adductooWechatMiniappVersion = async (data: Partial<WechatMiniappVersion>) => {
  return requestClient.post<WechatMiniappVersion>('/uctoo/wechat_miniapp_version/add', data);
};

export const edituctooWechatMiniappVersion = async (data: Partial<WechatMiniappVersion>) => {
  return requestClient.post<WechatMiniappVersion>('/uctoo/wechat_miniapp_version/edit', data);
};

export const deleteuctooWechatMiniappVersion = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechat_miniapp_version/del', { id });
};
